package service

type apiManager struct {
	routeMap map[string]*apiService
}

func (m *apiManager) AddRoute(apiService *apiService) {
	m.routeMap[apiService.Route.Name] = apiService
}

func (m *apiManager) GetRoute(name string) *apiService {
	if v, ok := m.routeMap[name]; ok {
		return v
	}
	return nil
}

var ApiManager = &apiManager{
	routeMap: map[string]*apiService{},
}
